# -*- coding: utf-8 -*-
# @Time : 2022/4/9 19:46
# @Author : Liuqing
# @File : 02_是否互为变位词.py
# @Software : PyCharm

from collections import Counter


def anagram(first, second):
    return Counter(first) == Counter(second)


if __name__ == '__main__':
    print(anagram('abcd3', '3acdb'))
